﻿
namespace System.Reflection
{
    public interface IPropertyAccessor<TEntity, TValue>
    {
        /// <summary>
        /// 获取值方法
        /// </summary>
        /// <param name="instance">取值对象</param>
        /// <returns>获取的值</returns>
        TValue GetValue(TEntity instance);

        /// <summary>
        /// 设定值方法
        /// </summary>
        /// <param name="instance">取值对象</param>
        /// <param name="value">需要设定的值</param>
        void SetValue(TEntity instance, TValue value);
    }
}
